import request from '@/utils/request';

// 列表接口
export function list(params: any) {
    return request({
        method: "get",
        url: "/tienchin/channel/list",
        params
    })
}
// 添加接口
export function add(data: any) {
    return request({
        method: "post",
        url: "/tienchin/channel",
        data
    })
}
// 详情接口
export function detail(channelId: number) {
    return request({
        method: "get",
        url: "/tienchin/channel/" + channelId,
    })
}

// 修改接口
export function updata(data: any) {
    return request({
        method: "put",
        url: "/tienchin/channel",
        data
    })
}

// 删除接口
export function userdel(id: any) {
    return request({
        method: "delete",
        url: "/tienchin/channel/" + id,
    })
}

// 导出接口
export function channelOut(data: any) {
    return request({
        method: "post",
        url: "/tienchin/channel/export",
        data,
        // 设置服务器返回的数据类型是个二进制文件对象（blob）
        responseType: "blob"
    })
}